package com.atguigu.lease.web.app.custom.webMvcConfig;

import com.atguigu.lease.web.app.custom.converter.customAppConverter;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 芦博
 * @description 全局配置添加到此处
 * @createDate 2025/11/15 15:29
 */
@Configuration
public class WebAppMvc implements WebMvcConfigurer {
    @Override
    //通过格式化 更新SpringBootMVC的转换器
    public void addFormatters(FormatterRegistry registry) {
        registry.addConverterFactory(new customAppConverter());
    }
}
